package yws.ssm.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import yws.ssm.domain.Account;

import java.util.List;

/**
 * 账户dao接口
 */
@Repository//把它交给IOC容器管
public interface AccountDao {
    //查询所有帐户
    @Select("select * from account")
    public List<Account> find_all();
    //保存账户信息
    @Insert("insert into account (name,money) values (#{name},#{money})")
    public void saveAccount(Account account);
}
